package com.kriss.crm.base;

import java.util.List;

public interface IBaseDao {

	
	public <T> void  save(T t) throws Exception;
	
	public <T> void  saveOrUpdate(T t) throws Exception;
	
	public <T> void  update(T t) throws Exception;
	
	
	public <T> void  delete(T t) throws Exception;
	
	
	public <T> T  get(Class<T> cls ,java.io.Serializable ID) throws Exception;
	
	public <T> T  findOneByHql(String hql ,Object... values) throws Exception;
	
	
	public <T>  List<T>  findAll(String hql,Object... values) throws Exception;
	
	
	public <T>  List<T>  findAll(String hql,int firstResult,int maxResult,Object... values) throws Exception;
	
	
	public Long count(String hql,Object... values) throws Exception;

}
